package cn.wusifx.zabbix.request.builder.user;

import cn.wusifx.zabbix.request.BaseRequest;
import cn.wusifx.zabbix.request.builder.UpdateRequestBuilder;

import java.util.Map;

/**
 * https://www.zabbix.com/documentation/4.0/manual/api/reference/usermacro/updateglobal
 */
public class UserMacroUpdateGlobalRequestBuilder extends UpdateRequestBuilder {
    private String globalmacroId;
    public UserMacroUpdateGlobalRequestBuilder(String auth) {
        super("usermacro.updateglobal", auth);
    }

    public UserMacroUpdateGlobalRequestBuilder(Long id, String auth) {
        super("usermacro.updateglobal", id, auth);
    }

    public String getGlobalmacroId() {
        return globalmacroId;
    }

    public UserMacroUpdateGlobalRequestBuilder setGlobalmacroId(String globalmacroId) {
        this.globalmacroId = globalmacroId;
        return this;
    }

    @Override
    public BaseRequest<Map<String, Object>> builder() {
        baseRequest.getParams().put("globalmacroid",globalmacroId);
        return baseRequest;
    }
}
